home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
ogrid100.zip
/
TCUTIL.INT
< prev
next >
Wrap
Text File
|
1994-12-29
|
2KB
|
118 lines
{ Copyright (c) 1989,90 by Borland International, Inc. }
unit TCUtil;
{ Turbo Pascal 6.0 object-oriented example miscellaneous utility routines.
This unit is used by TCALC.PAS.
See TCALC.DOC for an more information about this example.
}
{$S-}
interface
uses Crt, Dos;
const
FreeListItems = 100; { Sets the size of the free list }
Letters : set of Char = ['A'..'Z', 'a'..'z'];
Numbers : set of Char = ['0'..'9'];
ErrAbstractCall = 'Call to abstract method ';
ErrNoMemory = 'Out of memory';
NULL = 0;
BS = 8;
FF = 12;
CR = 13;
ESC = 27;
F1 = 15104;
F2 = 15360;
F3 = 15616;
F4 = 15872;
F5 = 16128;
F6 = 16384;
F7 = 16640;
F8 = 16896;
F9 = 17152;
F10 = 17408;
AltF1 = 26624;
AltF2 = 26880;
AltF3 = 27136;
AltF4 = 27392;
AltF5 = 27648;
AltF6 = 27904;
AltF7 = 28160;
AltF8 = 28416;
AltF9 = 28672;
AltF10 = 28928;
HomeKey = 18176;
UpKey = 18432;
PgUpKey = 18688;
LeftKey = 19200;
RightKey = 19712;
EndKey = 20224;
DownKey = 20480;
PgDnKey = 20736;
InsKey = 20992;
DelKey = 21248;
CtrlLeftKey = 29440;
CtrlRightKey = 29696;
AltX = 11520;
type
ProcPtr = procedure;
StringPtr = ^String;
WordPtr = ^Word;
CharSet = set of Char;
procedure Abstract(Name : String);
function Compare(var P1, P2; Length : Word) : Boolean;
function GetKey : Word;
function GetKeyUpCase : Word;
function GetKeyChar(Legal : CharSet) : Char;
procedure Abort(Message : String);
procedure Beep;
function FileExists(F : String) : Boolean;
function Min(N1, N2 : Longint) : Longint;
function Max(N1, N2 : Longint) : Longint;
function NumToString(N : Longint) : String;
function UpperCase(S : String) : String;
function FillString(Len : Byte; Ch : Char) : String;
function TruncStr(TString : String; Len : Byte) : String;
function PadChar(PString : String; Ch : Char; Len : Byte) : String;
function CenterStr(S : String; Width : Byte) : String;
function LeftJustStr(S : String; Width : Byte) : String;
function RightJustStr(S : String; Width : Byte) : String;
function ColToString(Col : Word) : String;
function RowToString(Row : Word) : String;
function StringToCol(S : String; MaxCols : Word) : Word;
function StringToRow(S : String; MaxRows : Word) : Word;
procedure ClearInputBuffer;
implementation
...
end.